<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<style>
		.kk{
			width: 400px;
			height: 400px;
			border: 1px solid black;
		}
		
		.box{
			width: 100px;
			height: 100px;
			background: lightpink;
			transition: 0.5s;
		}
		.box2{
			width: 50px;
			height: 50px;
			background:skyblue;
			transition: 0.5s;
		}
		.kk:nth-child(1):hover .box{
			transform: rotate(45deg);
		}
		
		.kk:nth-child(2):hover .box{
			transform: rotate(-45deg);
		}
		.box:nth-child(1):hover .box2{
			transform: rotate(-45deg);
		}
		
		.box:nth-child(2):hover .box2{
			transform: rotate(45deg);
		}
	</style>
	<body>
		<div class="kk">
			<div class="box">
				box
				<div class="box2">
					box2
				</div>
			</div>
		</div>
		<div class="kk">
			<div class="box">
				box
				<div class="box2">
					box2
				</div>
			</div>
		</div>
	</body>
</html>